package com.trust.entity.VO;

import com.trust.agri.sign.validate.SaveValidate;
import com.trust.agri.sign.validate.UpdateValidate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;

/**
 * @author ccc
 * @desc
 * @since 2023/11/14 21:32
 */
@Data
@ApiModel("供应商vo")
public class SupplyVO {

    @ApiModelProperty("id")
    @Null(message = "id 只能为空", groups = {SaveValidate.class})
    @NotNull(message = "id 不能为空", groups = {UpdateValidate.class})
    private Integer id;

    @ApiModelProperty("通讯地址")
    @NotBlank(message = "详细地址 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String address;

    @ApiModelProperty("联系方式")
    @NotBlank(message = "联系方式 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String phone;

    @ApiModelProperty("联系人")
    @NotBlank(message = "联系人 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String contact;

    @ApiModelProperty("是否启用")
    @NotNull(message = "是否启用 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer enabled;

    @ApiModelProperty("是否默认")
    @NotNull(message = "是否默认 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer isDefault;

    @ApiModelProperty("省")
    @NotNull(message = "省市区 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer province;

    @ApiModelProperty("市")
    @NotNull(message = "省市区 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer city;

    @ApiModelProperty("区")
    @NotNull(message = "省市区 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer district;

    @ApiModelProperty(value = "省份名称", allowEmptyValue = true)
    private String provinceName;

    @ApiModelProperty(value = "城市名称", allowEmptyValue = true)
    private String cityName;

    @ApiModelProperty(value = "区名称", allowEmptyValue = true)
    private String districtName;

    @ApiModelProperty("纬度")
    private BigDecimal latitude;

    @ApiModelProperty("经度")
    private BigDecimal longitude;

    @ApiModelProperty("供应商主体码")
    private String code;

    @ApiModelProperty(value = "简介", allowEmptyValue = true)
    private String introduce;

    @ApiModelProperty("供应商名称")
    @NotBlank(message = "供应商名称 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String name;

}
